﻿<me:PDCBase x:Class="WPFExcelReport.XSGB09"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport"              
                   Background="White"  
                    Loaded="Window_Loaded"
     >
    <me:PDCBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <CollectionViewSource   x:Key="vwGB11" Source="{Binding Path=SetProd.ICC_GB1109}" />
    </me:PDCBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock FontSize="18" Grid.Column="0" Text="成品仓库:" Width="Auto"></TextBlock>
                <TextBox Grid.Column="1" Foreground="Red"  MaxLength="2"   CharacterCasing="Upper"   FontSize="18" Text="{Binding CPLO}" Width="40" />
                <TextBox Grid.Column="2" Foreground="Red"  MaxLength="2"  CharacterCasing="Upper"  FontSize="18" Text="{Binding CPLB}" Width="40" />
                <TextBox Grid.Column="3" Foreground="Red"  MaxLength="8"  CharacterCasing="Upper"   FontSize="18" Text="{Binding CPLP}" Width="80" />
            </Grid>
            
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Button Grid.Column="0" FontSize="18"  Content="入库" Click="btnConfirmEntry_Click"/>
                <Button Grid.Column="1" Height="30" Width="30" Margin="0,0,0,0" Click="btnConfirmEntry_Click">
                    <Button.Background>
                        <ImageBrush  ImageSource="/YGRCPGB04;component/Image/button_ok.png" />
                    </Button.Background>
                </Button>
            </Grid>
        </WrapPanel>
        <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwGB11}}"  
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=GLLBEHI, Converter={StaticResource ResourceKey=pnum}}" Header="ID"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GPSPPART, Converter={StaticResource ResourceKey=Trim}}" Header="纺批"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GLLO}" Header=""  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GLLB}" Header="仓库"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GLLP}" Header=""  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CPLO}" Header=""  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CPLB}" Header="仓库"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CPLP}" Header=""  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GLBSTKG, Converter={StaticResource ResourceKey=d1000}}" Header="KG"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=TARGETQTY, Converter={StaticResource ResourceKey=d1000}}" Header="目标KG"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GLBEM, Converter={StaticResource ResourceKey=Trim}}" Header="包装"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=NEWDATE}" Header="转换"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CHGDATE}" Header="移库"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=GPGART, Converter={StaticResource ResourceKey=Trim}}" Header="纱线"  Width="Auto" /> 
                <DataGridTextColumn Binding="{Binding Path=GPGFARBE, Converter={StaticResource ResourceKey=Trim}}" Header="色号"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</me:PDCBase>